/*
 * Image.h : classical datatypes to read arbitrary image type
 *
 * Written by T.Pierron, july 2007.
 */


#ifndef	IMAGE_H
#define	IMAGE_H

#ifdef __GNUC__
#define	declPtr(func)  static typeof(func) (*p##func)
#define	openPtr(func)  p##func = (APTR) GetProcAddress(dll, #func)
#else
#error TODO
#endif

struct jpeg_error
{
	struct jpeg_error_mgr pub;
	jmp_buf setjmp_buffer;
};

struct jpeg_source
{
	struct jpeg_source_mgr pub;
	DATA8  buffer;
	ULONG  max;
	ULONG  first;
};

struct png_read
{
	DATA8  stream;
	int    length;
	int    pos;
};

typedef struct jpeg_error *  jpeg_error;
typedef struct jpeg_source * jpeg_source;
typedef struct png_read      png_read;

#endif
